package com.keba.lamp.ai.vo.query;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Map;


@Data
@Builder
@Accessors(chain = true)
@Schema(description = "Ai模型请求参数")
public class AiCallModelRequestQuery {
    /**
     * 业务id
     */
    @Schema(description = "业务id")
    private String bizId;
    /**
     * 应用id
     */
    @NotNull(message = "应用id不能为空")
    @Schema(description = "应用id")
    private Long appId;

    /**
     * 应用key
     */
    @NotBlank(message = "应用key不能为空")
    @Schema(description = "应用key")
    private String appKey;

    /**
     * 代表用户发出的消息
     */
    @Schema(description = "用户发出的消息")
    private String userPrompt;

    @Schema(description = "请求的内容")
    private List<CompletionContent> completionContents;

    @Schema(description = "ai返回的内容")
    private Object aiResponse;


    @Schema(description = "扩展信息")
    private Map<String, Object> extra;

    @Data
    @Builder
    @Accessors(chain = true)
    public static class CompletionContent {

        /**
         * 信息类型
         */
        @Schema(description = "信息类型:text/image_url/audio_url")
        @NotBlank(message = "信息类型不能为空,text/image_url/audio_url")
        private String type;

        /**
         * 内容
         */
        @Schema(description = "用户输入内容")
        private String content;

        /**
         * 文件地址
         */
        @Schema(description = "文件地址")
        private String fileUrl;
    }
}
